<template>
  <div class="ZhuanYiDan">
    <div class="count">共计{{ count }}条结果</div>
    <div class="list">
      <template v-if="list.length > 0">
        <TransferBox v-for="(item, index) in list" :key="index" :item="item" noBtn @getList=getList></TransferBox>
      </template>
      <template v-else>
        <no-data></no-data>
      </template>
    </div>
  </div>
</template>

<script>
import { Icon, XButton } from "vux";
import CommonSearch from "../components/search.vue";
import  TransferBox from "../components/Transfer-box.vue";
import AssetApi from "@/api/asset.js";
export default {
  components: { CommonSearch,  Icon, XButton, TransferBox},
  data() {
    return {
      name: "",
      count: 0,
      list: [],
    };
  },
  mounted() {
    this.getList();
  },
  methods: {
    getList() {
      let _params = {
        page: 1,
        pageSize: 1000,
        userId: this.$store.state.user.userInfo.wxUserId, //this.$store.state.user.userInfo.userId
      };
      AssetApi.myFindAllOut(_params).then((res) => {
        if (res.code == "0000") {
          this.list = res.data.records;
          this.count = res.data.total;
        }
      });
    },
  },
};
</script>

<style lang="less" scoped>
.ZhuanYiDan {
  background: #f1f1f1;
  height: 100vh;
}
.count {
  padding: 10px 20px;
  background: #fff;
}
.list {
  height: auto;
  background: #f1f1f1;
  padding: 10px;
  margin-bottom: 50px;
}

</style>
